<template>
    <div>
        <!-- 页面表格 -->
        <el-table :data="tableData" stripe style="width: 100%"
            :header-cell-style="{ 'background-color': ' rgb(39, 49,70)' }" class="table">
            <el-table-column type="selection" width="55"></el-table-column>
            <el-table-column prop="fN" label="档案号" width="120" align="center"></el-table-column>
            <el-table-column prop="name" label="姓名" align="center"></el-table-column>
            <el-table-column prop="date" label="评估日期" width="120" align="center"></el-table-column>
            <el-table-column prop="gentleTemperament" label="平和质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.gentleTemperament ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="deficiencyMass" label="气虚质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.deficiencyMass ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="yangQuality" label="阳虚质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.yangQuality ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="yingQuality" label="阴虚质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.yingQuality ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="phlegmyWet" label="痰湿质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.phlegmyWet ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="hotHumidNass" label="湿热质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.hotHumidNass ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="bloodStasis" label="血瘀质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.bloodStasis ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="qiDepressionMass" label="气郁质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.qiDepressionMass ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column prop="greatMass" label="特禀质" align="center">
                <template slot-scope="scoped">
                    <span>{{ scoped.row.greatMass ? '是' : '否' }}</span>
                </template>
            </el-table-column>
            <el-table-column label="操作" align="center" width="150">
                <template slot-scope="scope">
                    <el-button @click="write(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
                    <el-button @click="del(scope.$index, scope.row)" type="danger" size="small">删除</el-button>
                </template>
            </el-table-column>
            <el-table-column label="查看报告" align="center">
                <template slot-scope="scope">
                    <el-button @click="watch(scope.row)" type="primary" size="small">查看</el-button>
                </template>
            </el-table-column>
        </el-table>
        <!-- 编辑模态框 -->
        <el-dialog title="编辑" :visible.sync="writeDialog" >
            <el-form :inline="true" :model="formDate" label-width="80px">
                <el-form-item label="档案号" >
                    <el-input v-model="formDate.fN" placeholder="档案号"></el-input>
                </el-form-item>
                <el-form-item label="姓名">
                    <el-input v-model="formDate.name" placeholder="姓名"></el-input>
                </el-form-item>
                <el-form-item label="评估日期">
                    <el-input v-model="formDate.date" placeholder="评估日期"></el-input>
                </el-form-item>
                <el-form-item label="平和质">
                    <el-radio-group v-model="formDate.gentleTemperament">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="气虚质">
                    <el-radio-group v-model="formDate.deficiencyMass">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="阳虚质">
                    <el-radio-group v-model="formDate.yangQuality">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="阴虚质">
                    <el-radio-group v-model="formDate.yingQuality">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="痰湿质">
                    <el-radio-group v-model="formDate.phlegmyWet">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="湿热质">
                    <el-radio-group v-model="formDate.hotHumidNass">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="血瘀质">
                    <el-radio-group v-model="formDate.bloodStasis">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="气郁质">
                    <el-radio-group v-model="formDate.qiDepressionMass">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="特禀质">
                    <el-radio-group v-model="formDate.greatMass">
                        <el-radio label="是"></el-radio>
                        <el-radio label="否"></el-radio>
                    </el-radio-group>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
export default {
    data() {
        return {
            writeDialog: false,
            dialogFormVisible: false,
            input: '',
            Classified: '',
            tableData: [{
                id: 1,
                fN: '20180208172',
                name: '王二',
                date: '2022-07-15',
                gentleTemperament: true,
                deficiencyMass: false,
                yangQuality: false,
                yingQuality: false,
                phlegmyWet: false,
                hotHumidNass: false,
                bloodStasis: false,
                qiDepressionMass: false,
                greatMass: false,
            },
            {
                id: 2,
                fN: '20180208173',
                name: '张三',
                date: '2022-07-15',
                gentleTemperament: true,
                deficiencyMass: false,
                yangQuality: false,
                yingQuality: false,
                phlegmyWet: false,
                hotHumidNass: false,
                bloodStasis: false,
                qiDepressionMass: false,
                greatMass: false,
            }],
            formDate: [{
                fN: '',
                name: '',
                date: '',
                gentleTemperament: '',
                deficiencyMass: '',
                yangQuality: '',
                yingQuality: '',
                phlegmyWet: '',
                hotHumidNass: '',
                bloodStasis: '',
                qiDepressionMass: '',
                greatMass: '',
            }]
        }
    },
    // props:{tableData:Array},
    methods: {
        //打开修改模态框
        write(index, row) {
            this.writeDialog = true;

            this.Classified = row
        },
        del() {

        },
        watch() {

        }
    }
}
</script>

<style>
</style>